<?php 

插入数据
insert into student (name,age,score) values('马志斌','18','100');


更新数据

update student set age='20' where id = 7;

update student set age='20',name='马小小' where id = 7;

删除

delete from student where id >6;


delete from student ORDER BY AGE DESC LIMIT 1;


修改表名：

alter table student rename stu;

修改字段同时换名：

alter table student change id sid int(3);

alter table student change name sname varchar(100) not null default '';

只修改字段


alter table student modify sid int(5);


追加字段；


alter table student add phone int(13) after sname;

删除字段

alter table student drop phone;

删除主键

alter table student drop sid;

增加主键 

alter table student add primary key (sid);













 ?>